#include<stdio.h>
void mean(int sum)
{
	if (sum > 9)
		mean(sum / 10);
	printf("%d ", sum % 10);
}
int main()
{
	int sum = 0;
	scanf_s("%d", &sum);
	mean(sum);
	return 0;
}